
namespace OpenComposite.Base
{
	/// <summary>
	/// Summary description for Structures.
	/// </summary>
	#region db structures
	public struct structIdName
	{
		/// <summary>
		/// 
		/// </summary>
		public string id;
		
		/// <summary>
		/// 
		/// </summary>
		public string name;

		/// <summary>
		/// 
		/// </summary>
		public string ID
		{
			get
			{
				return id;
			}
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="ID"></param>
		/// <param name="Name"></param>
		public structIdName(string ID, string Name)
		{
			id = ID;
			name = Name;
		}

		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		public override string ToString()
		{
			return name;
		}

	}

    /// <summary>
    /// Rules and categories are stored both the same in database. Thats why we have a type
    /// saying if the current record is a rule or a category
    /// </summary>
    public class BusinessRuleType
    {
		public const string Rule = "Rule";
		public const string Category = "Category";
    }

    public class BusinessRuleCodeType
    {
        public const string Xpath = "xpath";
		public const string CSharp = "csharp";
    }

    public class BusinessRuleMasterName
    {
		public const string BusinessRule = "Business Rules";
		public const string ParticipantRule = "Participants Rules";
		public const string BusinessPartnerRule = "Business Partner Rules";

    }
    public class xpathEasyOperators
    {
		public const string Equal = "Equals";
		public const string Contains = "Contains";
		public const string DoesNotContain = "Does not contain";
		public const string DoesNotEqual = "Does not equal";
		public const string EqualsOrIsAbove = "Equals or is above";
		public const string EqualsOrIsBelow = "Equals or is below";
		public const string IsAbove = "Is above";
		public const string IsBelow = "Is below";
		public const string IsEmpty = "Is empty";
		public const string IsNotEmpty = "Is not empty";
    }

    /// <summary>
    /// A special treenode that contains output field information
    /// </summary>
    public class VarItem : System.Windows.Forms.TreeNode
    {
        public string name;
        public string value;
        public string desc;

        //public string var_id;
        public string var_type;
        //public string var_parent;
        public string var_parent_nm;
        public string var_datatype;

        public override string ToString()
        {
            string display = name + " = " + desc;
            return display;
        }

        /// <summary>
        /// Constructor
        /// </summary>
        public VarItem(string text):base(text)
        {
            name = text;
        }
    }


    /// <summary>
    /// A special treenode that contains output field information
    /// </summary>
    public class ProcessItem : System.Windows.Forms.TreeNode
    {
        public string bpel_guid;
        public string bpel_name;
        public string bpel_data;
        public string bpel_extensions;
        public string org_id;
        public string bpel_description;
        public string wsdl;
        public string type;
        public string parent_bpel_guid;

        public override string ToString()
        {
            string display = bpel_name + " = " + bpel_description;
            return display;
        }

        public ProcessItem(string text): base(text)
        {
            bpel_guid = text;
        }
    }



	#endregion
}
